package com.steven.io;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

public class keypadToFile {
	
public static void main(String[] args) throws Exception {
		
		InputStreamReader isr = new InputStreamReader(System.in);

		BufferedReader br = new BufferedReader(isr);
		
		
		OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("test.txt"));
		
		 BufferedWriter  bw = new  BufferedWriter(  osw );
		 
		String line = null ;
		while((line=br.readLine())!=null){
			if("over".equalsIgnoreCase(line))
				break;
//			System.out.println(line);
			bw.write(line);
			bw.newLine();
			bw.flush();
			
			
		}
		br.close();
		
		
		 
	}

}
